package com.worthtech.billportal.bean.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the acl_organization table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="acl_organization"
 */

public abstract class BaseOrganization  implements Serializable {

	public static String REF = "Organization";
	public static String PROP_PARENT_CODES = "ParentCodes";
	public static String PROP_PARENT_CODE = "ParentCode";
	public static String PROP_ORGANIZATION_NAME = "OrganizationName";
	public static String PROP_ID = "Id";
	public static String PROP_LEVEL = "Level";


	// constructors
	public BaseOrganization () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseOrganization (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String organizationName;
	private java.lang.String parentCode;
	private java.lang.String parentCodes;
	private java.lang.Integer level;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="organizationCode"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: organizationName
	 */
	public java.lang.String getOrganizationName () {
		return organizationName;
	}

	/**
	 * Set the value related to the column: organizationName
	 * @param organizationName the organizationName value
	 */
	public void setOrganizationName (java.lang.String organizationName) {
		this.organizationName = organizationName;
	}



	/**
	 * Return the value associated with the column: parentCode
	 */
	public java.lang.String getParentCode () {
		return parentCode;
	}

	/**
	 * Set the value related to the column: parentCode
	 * @param parentCode the parentCode value
	 */
	public void setParentCode (java.lang.String parentCode) {
		this.parentCode = parentCode;
	}



	/**
	 * Return the value associated with the column: parentCodes
	 */
	public java.lang.String getParentCodes () {
		return parentCodes;
	}

	/**
	 * Set the value related to the column: parentCodes
	 * @param parentCodes the parentCodes value
	 */
	public void setParentCodes (java.lang.String parentCodes) {
		this.parentCodes = parentCodes;
	}



	/**
	 * Return the value associated with the column: level
	 */
	public java.lang.Integer getLevel () {
		return level;
	}

	/**
	 * Set the value related to the column: level
	 * @param level the level value
	 */
	public void setLevel (java.lang.Integer level) {
		this.level = level;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.worthtech.billportal.bean.Organization)) return false;
		else {
			com.worthtech.billportal.bean.Organization organization = (com.worthtech.billportal.bean.Organization) obj;
			if (null == this.getId() || null == organization.getId()) return false;
			else return (this.getId().equals(organization.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}